package cn.wen.yinxiu.member.service;

import cn.wen.yinxiu.common.to.user.FareTO;
import cn.wen.yinxiu.common.to.user.UserAddressTO;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.wen.yinxiu.common.toolkit.PageUtils;
import cn.wen.yinxiu.member.entity.AddressEntity;

import java.util.List;
import java.util.Map;

/**
 * 用户地址
 *
 * @ClassName: AddressService
 * @Author 小飞
 * @Email coderwen22@163.com
 * @Date 2023-05-21 22:19:26
 * @Description:
 */
public interface AddressService extends IService<AddressEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 通过用户Id 获取该用户的全部地址列表
     *
     * @param userId
     * @return
     */
    List<UserAddressTO> getAddressByUserId(Long userId);

    /**
     * 获取地址和运费
     *
     * @param addrId
     * @return
     */
    FareTO getAddressFare(Long addrId);
}

